import React from 'react'
import { BaseListPage ,IBaseListPageState,IBaseListPageProps, http} from '@/lib';
import apis from '@/apis/SystemMasterDataManage'



export default class RelatedMaterialList extends BaseListPage<RelatedMaterialListProps, RelatedMaterialListState> {
    constructor(props){
        super(props)
        this.state = {
            title: "关联物料",
            rowKey: 'id',
            queryApi: (value)=>{
                console.log(props.match.params.id);
                let productGroupId = props.match.params.id
              return http.get(apis.ByProductGroupId,{params:{...value,productGroupId}})
            },
            method:'GET',
            conditions: [
                { id: 'prodBarcode', label: '物料编码'},
                { id: 'matName', label: '物料描述'},
            ],
            columns: [
                { title: '序号', dataIndex: 'id', render: (text, record, index) => index + 1 },
                ['物料分类编号', 'prodBarcode'],
                ['物料号描述', 'matName'],
                ['更新时间', 'updateTime'],
            ],
            tableProps: {
                scroll: { x: true },
            },
            onBack: this.props.history.goBack,
            
        }
    }
   

}


interface RelatedMaterialListState extends IBaseListPageState {

}

interface RelatedMaterialListProps extends IBaseListPageProps {

}

